<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script type="text/javascript" src="${staticPath}/lib/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		
		$("#queryBtn").click(function(){
			//if($.trim($("#dictType").val()) == ""){
			//	$("#dictForm").attr("action","${contextPath}/sys/dict/list");
			//}else{
			//	$("#dictForm").attr("action","${contextPath}/sys/dict/getByDictType");
			//}
		});
	});

	function funform(url,target){
		window.open(url,target);
	}
	
	/*
	function query(){
		var dictType = document.getElementById("dictType");
		if(dictType.value == ""){
			document.getElementById("dictForm").setAttribute("action", "${contextPath}/sys/dict/list");
		}else{
			document.getElementById("dictForm").setAttribute("action", "${contextPath}/sys/dict/getByDictType");
		}
	}*/
	
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">
				    	编码规则
						<button class="btn btn-success btn-sm pull-right" role="button" onclick="funform('${contextPath}/sys/syscoderule/add','_self');">新增</button>
				    </h3>
				   
				  </div>
					<table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								
								<th>编码</th>
								<th>名称</th>
								<th>类型</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${list}" var="sysCodeRule">
								<tr>
									
									<td>${sysCodeRule.number}</td>
									<td>${sysCodeRule.name}</td>
									<td>	<ossp:value dictType="RULECODTYPE" key="${sysCodeRule.systemType}"></ossp:value></td>		
									
									<td>
										<a href="${contextPath}/sys/syscoderule/${sysCodeRule.id}/edit">修改</a>
										<a href="${contextPath}/sys/syscoderule/${sysCodeRule.id}/delete"
										   onclick="return Oosp_Confirm('确认要删除该条数据吗？', this.href)">删除</a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				  <div class="panel-footer">
				  	<!--<page:pager page="${page}"/> 等待宏天分页功能完善-->
				  	<ul class="pagination o-list-pagination">
						<li class="disabled"><a href="javascript:">&#171; 上一页</a></li>
						<li class="disabled"><a href="#">1</a></li>
						<li class="disabled"><a href="#">下一页 &#187;</a></li>
						<li class="disabled info">&nbsp;<a href="javascript:">当前 <input type="text" value="1" onkeypress="var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(this.value,10);" onclick="this.select();"/> / <input type="text" value="10" onkeypress="var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(1,this.value);" onclick="this.select();"/> 条，共 10 条</a><li>
					</ul>
				  </div>
				</div>			
			</div>
		</div>
	</div>
</body>
</html>